package api;

import api.exception.MessageRunTimeException;

import java.util.List;

/**
 * @Desc: ""
 * @Author: caixiang
 * @DATE: 2020/6/18 10:59
 */
public interface MessageProducer {
    /**
     *  @Description 消息的发送，附带SendCallBack 回调执行响应的业务逻辑
     *  @Param
     *  @Return
     *  @Author caixiang
     *  @Date 2020/6/18  13:35
     **/
    void send(Message message,SendCallBack sendCallBack) throws MessageRunTimeException;

    /**
     *  @Description 多个消息的发送，附带SendCallBack 回调执行响应的业务逻辑
     *  @Param
     *  @Return
     *  @Author caixiang
     *  @Date 2020/6/18  13:35
     **/
    void send(List<Message> messages,SendCallBack sendCallBack) throws MessageRunTimeException;

    void send(Message message) throws MessageRunTimeException;

    void send(List<Message> messages) throws MessageRunTimeException;

}
